/*
 * Problem: 双六
 * Author: Yuanshun L
 * Created: 30-Nov-2021
 * Topic: 扩展欧几里得算法
 */

#include<cstdio>
int extgcd(int a,int b, int &x,int &y){
    int d = a;
    if(b!=0){
        d = extgcd(b,a % b,y,x);
        y -= (a/b) *x;
    }
    else{
        x = 1; y = 0;
    }
    return d;
}
int gcd(int a,int b){
    if(b == 0) return a;
    return gcd(b,a%b);
}

int main(){
//    freopen("data.in","r",stdin);
//    freopen("data.out","w",stdout);
    int a = 186, b = 54, c = 6;
    printf(gcd(a,b) == c ? "Yes":"No");
    int x,y;
    extgcd(a,b,x,y);
    printf("\nOne Case: a = %d, b = %d\n",x,y);
    return 0;
}
